Backing up GitCentric

This section describes the files that are backed up, and the steps to take for backing up GitCentric.

What gets backed up?

The full_backup.sh command backs up:

  • All Git repositories.
  • All GitCentric databases.
  • All configuration settings: database connection, Gerrit configuration (site/etc), Gerrit hooks (site/hooks), and SSH keys used for replication (site/ssh).

All files are backed up to a .TAR file that is created at the location from which you run the full_backup.sh command. The file is named kando_backup_site_etc_<yyyymmdd>.tar, where <yyyymmdd> is the year, month, and day.

You can move the backup file to, and restore it from, a different location if you choose.

Back to top

What are the GitCentric databases?

The GitCentric databases, kando and gcreviewdb, are PostgreSQL databases installed on the GitCentric server. These databases contain all AccuRev stream-Git branch mappings, as well as a history of all import and export activity. Stream-branch mappings are recorded using AccuRev transaction-Git commit pairs. For more information on the GitCentric databases, see Basic architecture.

Note: The GitCentric databases are entirely separate from the AccuRev database. The procedures described in this section apply only to the GitCentric databases and they have no effect on the AccuRev database.

How to back up GitCentric

This section describes how to back up your GitCentric repositories.

To begin the backup:

  1. Stop the GitCentric server using shutdown.sh:
    <ac_home>/WebUI/tomcat/bin/shutdown.sh
  2. Run full_backup.sh -l <path to gc_home>

    where <path to gc_home> is the full path to the GitCentric home directory you want to back up. For example:

    ./full_backup.sh -l /home/gitcentric/AccuRevGitCentric
    GitCentric displays a completion message, including the name of the .tar file, if the backup was successful; otherwise, it displays errors.
  3. Start the GitCentric server using startup.sh:
    <ac_home>/WebUI/tomcat/bin/startup.sh

    Note: Make sure that the user starting Tomcat web server has write access to the logs, temp, webapps, and work directories in <ac_home>/WebUI/tomcat. This user should have read access to all other Tomcat web server directories and files.

Back to top